﻿@using CoralNode.Core.Entity.Enums
@using CoralNode.MvcClient.Helper
@using Coralcode.Utils.Basic
@model CoralNode.Core.Entity.Domains.Prototype.PrototypeProcessDomain
@{
    ViewBag.Title = "Edit";
}
@Html.IncludePage("CoralAdmin/prototype", "_Left", new { current = "prototype" })
<div id="pbody">
    <div class="extra">
        <div class="pbody_top">
            <span class="ico ico_setting_system"></span><span class="t t_c">内容设计&nbsp;&nbsp;/&nbsp;&nbsp;工作流管理&nbsp;&nbsp;/&nbsp;&nbsp;添加工作流</span>
        </div>
        <div id="main">
            <div class="funsearch p_1 pl_2 pr_2 extra_normal border-bottom1">
                <a href="/m/prototype/listProcess" class="ico ico_back btn f_r mt_0-5"></a>
            </div>
            <div class="">
                <form id="spform" action="/m/prototype/createProcess" method="POST">
                    @if (@ViewBag.Msg != null) {
                        <div class="error_msg">
                            @ViewBag.Msg.Msg
                        </div>
                    }
                    @Html.AntiForgeryToken()
                    @Html.ValidationSummary(true)
                    <div class="fieldContainer">
                        <div id="fieldManage">
                            <div class="pt_1 slideswitch pl_2 pr_2" data-js="slideswitch">
                                <div class="switch_tab">
                                    <span class="btn"><i class="ico ico_slideswitch_show"></i></span>主要信息
                                </div>
                                <div class="table_form form_main switch_cnt">
                                    <table>
                                        <tbody>
                                            <tr>
                                                <th width="60">名称<span class="rq">*</span></th>
                                                <td>
                                                    @Html.TextBoxFor(m => m.Title, new { @class = "text w_37 required" })
                                                </td>
                                            </tr>
                                            <tr>
                                                <th width="60">编码<span class="rq">*</span></th>
                                                <td>
                                                    @Html.TextBoxFor(m => m.Code, new { @class = "text w_37 required" })
                                                </td>
                                            </tr>
                                            <tr>
                                                <th>原型</th>
                                                <td>
                                                    <div class="slt js-select" name="PrototypeId" wd="264" swd="220">
                                                        <div class="curr"><span></span></div>
                                                        <div class="show">
                                                            <ul>
                                                                @foreach (var item in @ViewBag.PrototypeList) {
                                                                    if (Model.PrototypeId == @item.Id) {
                                                                    <li selected="selected" val="@item.Id"><a>@item.Title</a></li>
                                                                    } else {
                                                                    <li  val="@item.Id"><a>@item.Title</a></li>
                                                                    }
                                                                }
                                                            </ul>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th width="60">描述</th>
                                                <td>
                                                    @Html.TextAreaFor(m => m.Description, new { @class = "w_58 h_10" })
                                                </td>
                                            </tr>
                                            <tr>
                                                <th width="60">排序</th>
                                                <td>
                                                    @Html.TextBoxFor(m => m.Step, new { @class = "text w_37" })
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <div id="fieldFrame" style="top:0;">
                            <input type="hidden" name="DataSet" value='[{"entryName":"选项1","entryValue":"Default1"},{"entryName":"选项2","entryValue":"Default2"}]' />
                            <input type="hidden" name="DefaultValue" value="Default1" />
                            <iframe name="fieldFrame" scrolling="auto" src="/Themes/CoralAdmin/_misc/field/processSelect.html"
                                frameborder="0"></iframe>
                        </div>

                        <div class="fun p_2">
                            <input class="btn_1" type="submit" value="提交保存">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<style>
    #fieldManage table tr * { cursor: auto; }
</style>
<script type="text/javascript">
    $(document).ready(function () {
        $('.nav_left_style2').find('li').eq(3).addClass('current');
    });
</script>
